package com.lichengGongshang.util;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by dl on 2015/11/11.
 */
public class GetTime {
    private static SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");//设置日期格式

    public static String getDetailTime() {
        SimpleDateFormat ddf = new SimpleDateFormat("yyyyMMdd");
        String currentTime = ddf.format(new Date());
        return currentTime;
    }

    public static String currentTime(){
        Timestamp ts = new Timestamp(System.currentTimeMillis());
        String datatime = ts.toString();
        return datatime;
    }

    public static String getNormalTime() {
        SimpleDateFormat ddf = new SimpleDateFormat("yyyyMMddHHmmss");
        String currentTime = ddf.format(new Date());
        return currentTime;
    }
}
